package com.jyy.prefabricated.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyy.prefabricated.enums.BaseTeamEnum;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 内容表(Content)实体类
 *
 * @author makejava
 * @since 2021-05-13 14:43:01
 */
@Data
public class Content implements Serializable {
    private static final long serialVersionUID = -93789540573438917L;

    private Integer id;
    /**
     * 名称
     */
    @NotNull(message = "contentName不能为空")
    private String contentName;
    /**
     * 学员服务id
     */
    @NotNull(message = "studentServiceId不能为空")
    private Integer studentServiceId;
    /**
     * 分类id
     */
    @NotNull(message = "contentCategoryId不能为空")
    private Integer contentCategoryId;
    /**
     * 封面
     */
    @NotNull(message = "pic不能为空")
    private String pic;
    /**
     * 排序值
     */
    private Integer sort;
    /**
     * 链接
     */
    private String linkAddress;
    /**
     * 简介
     */
    @NotNull(message = "content不能为空")
    private String content;
    /**
     * 原价
     */
    private Double listPrice;
    /**
     * 售价
     */
    private Double price;
    /**
     * 是否显示价格(0不显示，1显示)
     */
    private Integer showed;
    /**
     * 是否删除(0未删除，1删除)
     */
    private Integer deleted;
    /**
     * 租户编码
     */
    private String teamCode = BaseTeamEnum.BASE.getValue();
    private String category;
    /**
     * 底色
     */
    private String bottomColor;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    /**
     * 更新时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * 课程附件
     */
    private List<AccessoryFile> files = new ArrayList<>();

    private String orderStr;

}
